<template>
  <div class="nodata">
    <div class="icon" :style="icon|fmtBg"></div>
    <div class="text">{{text}}</div>
  </div>
</template>

<script>
  export default {
    props: {
        icon:{
          type:String,
          default(){
            return "/images/other/nodata.png"
          }
        },
      text:{
          type:String,
          default(){
            return "暂无数据"
          }
      }
    },
    data () {
      return {
      }
    },
  }
</script>

<style lang="scss">
  .nodata {
    position: absolute;
    top: 36%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    .icon {
      width: 100%;
      height: 1.8rem;
      background: no-repeat center;
    }
    .text {
      color: #bbbbbb;
    }
  }
</style>

